package com.tpc.jginterface.task;

import com.tpc.jginterface.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class StockTask {

    @Autowired
    private StockService stockService;

    @Scheduled(cron = "${UPLOAD.STOCK}")
    public void uploadStock(){
        stockService.uploadStock();
    }
}
